package com.jdrx.sw.sewage.beans.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * sewage_station_device_point
 */
@Data
@ApiModel(value = "GatherDevPointPO", description = "站点的采集设备点位")
public class GatherDevPointPO implements Serializable {
    private static final long serialVersionUID = -1206960462117924923L;

    @NotNull
    @Range(min = 1)
    @ApiModelProperty(value = "主键ID", required = true)
    private Long id;

    @NotEmpty
    @Length(min = 1, max = 200)
    @ApiModelProperty(value = "点位名称", required = true)
    private String name;

    @NotEmpty
    @Length(min = 1, max = 100)
    @ApiModelProperty(value = "点位值(遵循命名规范YYC1_JBJ1_GZ)", required = true)
    private String value;

    @NotNull
    @ApiModelProperty(value = "是否删除标识true为删除 false为正常", required = true)
    private Boolean deleteFlag;

    @NotNull
    @Range(min = 1)
    @ApiModelProperty(value = "采集设备id(外键)", required = true)
    private Long gatherDevId;

    @NotNull
    @Range(min = 1)
    @ApiModelProperty(value = "字典id", required = true)
    private Long dictId;

    @NotNull
    @Range(min = 1)
    @ApiModelProperty(value = "所属站点(外键)", required = true)
    private Long stationId;

    @ApiModelProperty(value = "物联网网关编号")
    private String iotGatewayNum;

    @ApiModelProperty(value = "参数单位")
    private String parUnit;

    @ApiModelProperty(value = "参数值")
    private Double parValue = 0.0;

    @ApiModelProperty(value = "读写(true - 读写 false - 只读)")
    private Boolean readWrite;

    @ApiModelProperty(value = "精度(保留小数点位数)")
    private Integer precision;

    @ApiModelProperty(value = "控制类型（特性）")
    private String controlType;

    @NotEmpty
    @Length(min = 1, max = 200)
    @ApiModelProperty(value = "工艺单元设备点位名称", required = true)
    private String pdgName;

    @NotEmpty
    @Length(min = 1, max = 200)
    @ApiModelProperty(value = "纯点位值", required = true)
    private String gValue;

    @NotEmpty
    @Length(min = 1, max = 200)
    @ApiModelProperty(value = "厂区（1-99）", required = true)
    private String factoryPeriod;

    @NotEmpty
    @Length(min = 1, max = 200)
    @ApiModelProperty(value = "PLC逻辑点位(0 - 否 1 - 是)", required = true)
    private Integer plcLogicPoint;

    @NotEmpty
    @Length(min = 1, max = 200)
    @ApiModelProperty(value = "采集时间", required = true)
    private LocalDateTime collectTime;

    @NotEmpty
    @Length(min = 1, max = 200)
    @ApiModelProperty(value = "纯点工艺单元值", required = true)
    private String pValue;
}